﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VoteStatList.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Weixin.VoteStatList" %>

<%@ Import Namespace ="ZLCMS.Business.Util" %>

<%=_framePage.GetPagerFormHtml(Request.RawUrl)%>

<style type="text/css">
.barbox{height:18px;line-height:18px;overflow:hidden;font-size: 12px;vertical-align: middle;}
.barbox div{float:left;font-size:14px;width:112px;text-align:right;}
.barbox div a{color:#0048CC;}
.barbox div{float:left;}
.barbox div.last{color:#999;}
.barbox div.barline{width:160px;background:#E3E3E3;height:12px;overflow:hidden;margin:3px 10px 0 10px;display:inline;border-bottom:solid 1px #F4F4F4;border-right:solid 1px #F4F4F4;}
.barbox div.barline div.progressbar{height:10px;overflow:hidden;background:url(/SystemManage/javascripts/progressbar/pbar/barbg.gif) repeat-x;}
.barbox div.barline div.progressbar.barred{background-position:0 0;border:1px solid #C2142C;}
.barbox div.barline div.progressbar.baryellow{background-position:0 -10px;border:1px solid #EFA804;}
.barbox div.barline div.progressbar.barblue{background-position:0 -20px;border:1px solid #0A83E6;}
</style>

<form id="pageForm" method="post" runat="Server" class="pageForm" 
    onsubmit="return navTabSearch(this);" action="/SystemManage/Weixin/Interaction/VoteStatList.aspx">
    
<div class="pageHeader">
	<div class="searchBar">
        <div style="height: 25px; line-height: 25px;">
			<span style="margin: 0px 10px;">投票状态：&nbsp; <%= ParamKit.GetValue("WxGamesStatus", _voteDb == null ? "SETTING" : _voteDb.Status, "&nbsp;")%></span>
			<span style="margin: 0px 10px;">参与人次：&nbsp;<%= _totalCount %></span>
        </div>
	    <div class="subBar">
			<%--<ul>
			<li>
			    <a class="buttonActive" href="<%= Request.Path %>" onclick="ZLAN_DWZ_EX.query(this);" 
			    target="navTab" rel="<%= _framePage.NavTabId %>" title="<%= _framePage.NavTabTitle %>"><span>&nbsp;查&nbsp;询&nbsp;</span></a>
			</li>
			</ul>--%>
	    </div>
	</div>
</div>

<div class="pageContent">
   	<div class="panelBar">
		<ul class="toolBar">
		</ul>
	</div>
	<div class="tableList" layoutH="116">
	<table class="list" targetType="navTab" asc="asc" desc="desc">
	    <thead>
			<tr>
                <th width="22px"><input type="checkbox" group="ids" class="checkboxCtrl"/></th>
				<th width="100px">选项</th>
				<th width="250px">投票内容</th>
				<th width="100px">投票人次</th>
				<th width="250px">百分百</th>
			</tr>
		</thead>
		<tbody>
                <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
            
			<tr target="uid" rel="<%#Eval("Id") %>">
                <td><input name="ids" value="<%#Eval("Id") %>" type="checkbox"/></td>
                <td><%#Eval("Id") %> </td>
                <td><%#Eval("Title") %> </td>
                <td><%#GetVoteCounter(Eval("Id")) %></td>
                <td>
                <div class="barbox">
                <div class="barline">
                <div divindex="3" id="chartSlide_3"  w="<%# _totalCount == 0 ? "1" : (GetVoteCounter(Eval("Id")) * 100 / _totalCount).ToString("0.00")%>" style="width:0px;" class="progressbar"></div>
                </div><%# _totalCount == 0 ? "0" : (GetVoteCounter(Eval("Id")) * 100 / _totalCount).ToString("0.00")%>%
                </div></td>
			</tr>
            </ItemTemplate>
            </asp:Repeater>
<%--
			<tr target="uid" rel="B">
                <td><input name="ids" value="B" type="checkbox"/></td>
				<td style="display: none"><span>B</span></td>
                <td><%= _itemList[1].VoteKey %></td>
                <td><%= _itemList[1].VoteContent%></td>
                <td><%= _itemBCount %></td>
                <td><%= _totalCount == 0 ? "0" : (_itemBCount * 100 / _totalCount).ToString("0.00")%>%</td>
			</tr>
			<tr target="uid" rel="C">
                <td><input name="ids" value="C" type="checkbox"/></td>
				<td style="display: none"><span>C</span></td>
                <td><%= _itemList[2].VoteKey %></td>
                <td><%= _itemList[2].VoteContent%></td>
                <td><%= _itemCCount %></td>
                <td><%= _totalCount == 0 ? "0" : (_itemCCount * 100 / _totalCount).ToString("0.00")%>%</td>
			</tr>
			<tr target="uid" rel="D">
                <td><input name="ids" value="D" type="checkbox"/></td>
				<td style="display: none"><span>D</span></td>
                <td><%= _itemList[3].VoteKey %></td>
                <td><%= _itemList[3].VoteContent%></td>
                <td><%= _itemDCount %></td>
                <td><%= _totalCount == 0 ? "0" : (_itemDCount * 100 / _totalCount).ToString("0.00")%>%</td>
			</tr>--%>
		</tbody>
	</table>
	</div>
	
     <%= _framePage.GetPagerContentHtml()%>
</div>

<script language="javascript">
    function animate() {
        $(".progressbar").each(function (i, item) {
            $(item).addClass('barblue');
            var a = $(item).attr("w");
            $(item).animate({
                width: $(item).attr("w") + "%"
            }, 1000);
        });
    }
    $(function () { 
    animate();
    });
</script>
</form>